package vista;

import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javabean.JPanelImagen;
import javax.swing.ImageIcon;
import javax.swing.JButton;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class vMenuPrincipal extends javax.swing.JFrame {
private JPanelImagen panFondo;
private JButton btnpuntuacion;
private JButton btnsalir;
private JButton btninstrucciones;
private JButton btnjugar;
	/**
	* Auto-generated main method to display this JFrame
	*/
	public vMenuPrincipal() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				panFondo = new JPanelImagen();
				getContentPane().add(panFondo, BorderLayout.CENTER);
				panFondo.setRutaImagen("/imagenes/menuprincipal.jpg");
				{
					btnjugar = new JButton();
					panFondo.add(btnjugar);
					btnjugar.setText("Jugar");
					btnjugar.setBounds(405, 221, 122, 33);
					btnjugar.setForeground(new java.awt.Color(128,64,0));
				}
				{
					btninstrucciones = new JButton();
					panFondo.add(btninstrucciones);
					btninstrucciones.setText("Instrucciones");
					btninstrucciones.setBounds(384, 277, 164, 36);
					btninstrucciones.setForeground(new java.awt.Color(128,64,0));
				}
				{
					btnsalir = new JButton();
					panFondo.add(btnsalir);
					btnsalir.setText("Salir");
					btnsalir.setBounds(427, 388, 77, 31);
					btnsalir.setForeground(new java.awt.Color(128,64,0));
				}
				{
					btnpuntuacion = new JButton();
					panFondo.add(btnpuntuacion);
					btnpuntuacion.setText("Puntuacion");
					btnpuntuacion.setBounds(412, 334, 108, 35);
					btnpuntuacion.setForeground(new java.awt.Color(128,64,0));
				}
			}
			pack();
			setSize(600, 500);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
		
	
	}
	
	public void addListener(ActionListener action){
		this.btnjugar.addActionListener(action);
		this.btninstrucciones.addActionListener(action);
		this.btnsalir.addActionListener(action);
		this.btnpuntuacion.addActionListener(action);
	}
}
